<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  <script type="text/javascript" th:src="@{/webjars/jquery/jquery.min.js}"></script>
</head>
<body>
  <div id="content">
  
  </div>
  <script type="text/javascript">
  function getParam(name){
    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");     
    var r = window.location.search.substr(1).match(reg);
    //search,查询？后面的参数，并匹配正则    
    if(r!=null)
      return  unescape(r[2]); 
    return null;
  }
  $(function(){
    var cate;
    var cid = getParam("cid");
    if(cid){
      $.ajax({
        url : '/warCategory/detail',
        data : {'cateId': cid},
        type : 'post',
        dataType : 'json',
        success : function(res) {
          if (res.code == 0) {
            cate = res.data;
            $("#content").html(cate.desc);
          } else {
            alert(res.msg)
          }
        },
        error : function(a, b) {
          console.log(b);
          artDialog.alert(res.msg)
        }
      });
    }else{
      artDialog.alert("需按正常流程操作功能");
    }
  });
  </script>
</body>
</html>
